Calls GetLock(), runs the specified Func, calls ReleaseLock() and then returns the value returned by the Func.
'Declaration
Overloads Function WithLock(Of )( _
ByVal As System.Func(Of TResult) _
) As
'Usage
Dim instance As IWorkbookSet
Dim func As System.Func(Of TResult)
Dim value As
value = instance.WithLock(Of TResult)(func)
WithLock<>(
System.Func<TResult>
)
function WithLock(
: System.Func
): ;
function WithLock(
: System.Func
) : ;
WithLock<>(
System.Func<TResult*>*
)
WithLockgeneric<typename >
(
System.Func<TResult^>^
)
Parameters
- func
- The function to run.
Type Parameters
- TResult
- The type of the result returned by 'func'.
Return Value
The value returned by 'func'.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2